from building import *
import os

cwd = GetCurrentDir()
CPPPATH = [cwd]
src = []

if GetDepend('CONFIG_VFS'):
    src += Glob('t-fs-init.c')

    if GetDepend('CONFIG_TEST_MEMBLOCK'):
        src += Glob('t-memblock.c')

    if GetDepend('CONFIG_TEST_PAGE'):
        src += Glob('t-page.c')

    if GetDepend('CONFIG_TEST_SLAB'):
        src += Glob('t-slab.c')

group = DefineGroup('test', src, depend = [''], CPPPATH = CPPPATH)

list = os.listdir(cwd)
for item in list:
    if os.path.isfile(os.path.join(cwd, item, 'SConscript')):
        group = group + SConscript(os.path.join(item, 'SConscript'))

Return('group')
